package com.ruoyi.category.service.impl;


import java.util.List;

import com.ruoyi.category.mapper.WebCarouselMapper;
import com.ruoyi.category.service.IWebCarouselService;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.model.banner.WebCarousel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * aaaService业务层处理
 *
 * @author ruoyi
 * @date 2024-08-03
 */
@Service
public class WebCarouselServiceImpl implements IWebCarouselService
{
    @Autowired
    private WebCarouselMapper webCarouselMapper;

    /**
     * 查询aaa
     *
     * @param id aaa主键
     * @return aaa
     */
    @Override
    public WebCarousel selectWebCarouselById(Long id)
    {
        return webCarouselMapper.selectWebCarouselById(id);
    }

    /**
     * 查询aaa列表
     *
     * @param webCarousel aaa
     * @return aaa
     */
    @Override
    public List<WebCarousel> selectWebCarouselList(WebCarousel webCarousel)
    {
        return webCarouselMapper.selectWebCarouselList(webCarousel);
    }

    /**
     * 新增aaa
     *
     * @param webCarousel aaa
     * @return 结果
     */
    @Override
    public int insertWebCarousel(WebCarousel webCarousel)
    {
        webCarousel.setCreateTime(DateUtils.getNowDate());
        return webCarouselMapper.insertWebCarousel(webCarousel);
    }

    /**
     * 修改aaa
     *
     * @param webCarousel aaa
     * @return 结果
     */
    @Override
    public int updateWebCarousel(WebCarousel webCarousel)
    {
        webCarousel.setUpdateTime(DateUtils.getNowDate());
        return webCarouselMapper.updateWebCarousel(webCarousel);
    }

    /**
     * 批量删除aaa
     *
     * @param ids 需要删除的aaa主键
     * @return 结果
     */
    @Override
    public int deleteWebCarouselByIds(Long[] ids)
    {
        return webCarouselMapper.deleteWebCarouselByIds(ids);
    }

    /**
     * 删除aaa信息
     *
     * @param id aaa主键
     * @return 结果
     */
    @Override
    public int deleteWebCarouselById(Long id)
    {
        return webCarouselMapper.deleteWebCarouselById(id);
    }

    @Override
    public WebCarousel selectWebCarouselByName(String name) {
        return webCarouselMapper.selectWebCarouselByName(name);
    }
}

